home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / MATHS / RLAB / RLAB125.ZIP / !RLaB / misc / MAC / README.mac < prev   
Text File  |  1994-07-18  |  12KB  |  266 lines

  1.                                                 
  2.                                                             07/10/1994
  3.  
  4.  
  5. This is the Macintosh port of RLaB 1.02a program. RLaB is a Matlab-like 
  6. linear algebra package.  The author is 
  7.     
  8.          Ian Searle
  9.          ians@eskimo.com
  10.     
  11. RLaB is an interpreter for the RLaB Programming Language/Environment. 
  12. The RLaB language is useful for matrix or array oriented numerical
  13. analyses. RLaB is especially useful for prototyping and experimenting 
  14. with algorithms. RLaB extensively uses the LAPACK, FFTPACK and RANLIB 
  15. sources available from netlib.att.com and PLPLOT from dino.ph.utexas.edu.
  16.         
  17. MacRLaB is not a full port of RLaB.  Some items will probably never
  18. be fully supported as they are too tied to the Unix operating system.  
  19. Examples are the 'pipe', the 'fork', the 'socket', and many others.  
  20. Other features are handled a little differently in the Mac version.  
  21. Most of the important differences or extensions of the MacRLaB port 
  22. are described below.
  23.  
  24. 1. Please print out and study the RLaB Primer first, the file is in
  25.    ":doc:rlabp.ps". You can print this Postscript file using 'ShowPages'
  26.    program (simply drag and drop it into ShowPages , assume that 
  27.    you have a Postscript printer connected, of course).
  28.   
  29.    The full history command editing capacity is built-in.  To recall 
  30.    previous commands, just press up and down arrow keys.  
  31.    The 'control' key described in the RLaB Primer can be replaced by the 
  32.    'command' key on the Mac keyboard.  Delete-cursor-character (del) is also 
  33.    supported.  The full description of command line editing is in file
  34.    ":help:COMMAND_EDIT", or type "help COMMAND_EDIT" in RLaB.
  35.    If you need other handy keys, I would like to hear about that.  
  36.  
  37. 2. In this version, you can set up your own file search-path(RLAB_SEARCH_PATH), 
  38.    start-up file (RLAB_RC0), etc.. The default settings are stored in the file 
  39.    'RLab-Preference'. 
  40.    
  41.    To change the settings, just use a text editor to change.  You have to
  42.    set the PLPLOT_DIR environmental variable to the path of your RLaB folder.  
  43.    This setting is important because PLPLOT has to know the location of font 
  44.    files 'plstnd5.fnt' and 'plxtnd5.fnt'.  After making the changes, the file 
  45.    'RLab-Preference' has to be placed in the 'System Folder:Preferences' folder.
  46.  
  47.    For example, if your absolute RLaB folder (directory) path is like
  48.    
  49.    HD --- Appl --- RLaB 
  50.    
  51.    then you can put the following environmental variables in 'RLab-Preference':
  52.    
  53.    RLAB_RC0 = ".rlab";
  54.    PLPLOT_DIR = "HD:Appl:RLaB";
  55.    RLAB_HELP_DIR = "HD:Appl:RLaB:help";
  56.    RLAB_LIB_DIR = "HD:Appl:RLaB:rlib";
  57.    RLAB_SEARCH_PATH = "HD:Appl:RLaB:toolbox;HD:Appl:RLaB:examples"; 
  58.  
  59.    You can have several search-paths, just put them together and use ';' as
  60.    delimiter (see above example with 2 search paths).
  61.    Since RLaB uses absolute search path, the the maximum length of each path 
  62.    is 31 characters in length, don't place RLaB folder too deep in your hard 
  63.    disk directory tree.  Also, don't drag MacRLaB out of RLaB folder, use alias.
  64.    
  65.    If you feel the font/size in the MacRLaB console is not the best choice, 
  66.    feel free to change it.  The environmental variable RLAB_FONT can be set
  67.    to one of the following numbers (check Mac document for more):
  68.    
  69.                0 SystemFont
  70.                1 AppleFont
  71.                2 NewYork
  72.                3 Geneva
  73.                4 Monaco
  74.                5 Venice
  75.                6 London
  76.                7 Athens
  77.                8 SanFrancisco
  78.                9 Toronto
  79.               11 Cairo
  80.               12 LosAngles
  81.               20 Times
  82.               21 Helvetica
  83.               22 Courier
  84.  
  85.    It is better to use constant width fonts such as Monaco and Courier,
  86.    otherwise the output will not be aligned.
  87.    The font size (RLAB_SIZE) can be set to any number from 1 to 127 points.  
  88.    The popular font sizes for the console are 
  89.                
  90.                9 points
  91.               10 points
  92.               11 points
  93.               12 points
  94.               14 points
  95.               18 points
  96.               
  97.    You can change the number of rows (RLAB_ROWS) on the console also.  
  98.    Default values are   
  99.  
  100.               RLAB_FONT = "4 Monaco";
  101.               RLAB_SIZE = "9 points";
  102.               RLAB_ROWS = "25";
  103.    
  104.    If you put RLaB folder in a RAM-disk, you have to rename .rlab to another 
  105.    name without '.' as its first character, then put the new name in RLAB_RC0 
  106.    environmental variable.  MacRLaB will hang if it reads .rlab from a
  107.    RAM-disk.  You tell me why.
  108.    
  109.          
  110. 3. This version of RLaB comes with a built-in plotting library PLPLOT.
  111.    PLPLOT is a powerful tool for XY and XYZ graphics.  It can generate
  112.    (via plprint) Postscript, color Postscript, HP LJ, and lots of other 
  113.    formats for post processing. 
  114.  
  115.    I've implemented a minimum Mac interface for PLPLOT4.99g.  Multi-window is 
  116.    allowed but the redrawing is slow.  The number of windows is limited 
  117.    to 10.  You can resize graphics windows in this version.
  118.    Because RLaB keeps scanning the command line and providing line 
  119.    editing service, if you wish to watch background graphics windows, you must 
  120.    enter pause mode before you can click any background graphics window.  
  121.    You can enter pause mode by calling function
  122.        pause();
  123.    or type 
  124.        ESC--P
  125.    in RLaB interactive environment (ESC--P means: press ESC, release ESC, 
  126.    press P, release P).   ESC--P is equivalent to ESC--` (on mac extended 
  127.    keyboards, the ESC key is near to the ` key, see).
  128.        
  129.    The interface is based on ColorQuickDraw routines.  Sixteen colors are 
  130.    directly available in PLPLOT. These colors are pre-assigned as the
  131.    following numbers:
  132.    
  133.       1       2         3        4        5         6         7       8
  134.      black   red    yellow      green  aquamarine  pink     wheat   gray
  135.    
  136.       9      10        11       12       13        14        15      16
  137.      brown   blue   blueviolet  cyan   turquoise   magenta  salmon  white 
  138.       
  139.    You can select color by _plcol() function.  More colors are available by
  140.    using RGB combinations (see PLPLOT manual). There are three things remained  
  141.    to be done -- add scroll bar to the MacRLaB window, add copy/paste ability 
  142.    in the graphics windows, and add PICT image to the generated EPS files.
  143.    
  144.    At this stage, you can include the Postscript output (EPSF) in your document
  145.    (Word, MacDraw, Canvas, TeX, ...) but you can only see a big crossed
  146.    box (the bounding box) on the screen due to the lack of PICT image.
  147.    You can perform scaling, rotating, dragging,... on the box except there
  148.    is no picture inside.  The picture will appear in the printed copy.
  149.    If you need superscript, subscript, over/under line char, and Greek letters 
  150.    in annotation of axis, title, etc., then you need to get a copy of PLPLOT 
  151.    manual.  See README.PLPLOT for detail.  Here is an example which uses 
  152.    Greek letters and superscript,
  153.    
  154.    >load(":examples:fun_plot.r");
  155.    
  156.    or
  157.    
  158.    >rfile fun_plot
  159.    
  160.    Another plotting example is in ":examples:plot_test.r", try
  161.    
  162.    >rfile plot_test
  163.  
  164.    You can click on those background windows to see them again. The graphics 
  165.    windows are numbered as plplot 0, plplot 1, plplot 2, ..., and so on.  You 
  166.    can also resize or drag them.  Resizing on the screen will not affect 
  167.    the quality of later plprint() output. 
  168.    
  169.    For each graph window, there is a temporary file (SCRATCH ????) 
  170.    associated with it.  It contains your plotting commands which can be used
  171.    later to produce a Postscript or other types of graphics files (via
  172.    plprint).  It is also used by my Mac interface in redrawing.  Don't dump
  173.    them to trash during the execution of MacRLaB.   They will be automatically 
  174.    eliminated after the execution.   Also, don't use pend() to close 
  175.    graphics windows unless you don't want to plot anymore. Use pclose() 
  176.    instead.  plplot has a bug that it does not close the plotting command 
  177.    file even you close the graphics window by pend() or pclose().  So if you 
  178.    continue to plot after pend(), the old picture together with the new 
  179.    picture will appear on the new window.
  180.       
  181. 4. By the way, do you know how to change directory (folder) using cd() on the 
  182.    Mac?  Here is how.
  183.    
  184.    Suppose that your hard disk directory tree is like this
  185.    
  186.                             ----- Peggy
  187.                             |                             |-- rlib
  188.          --------- App -----|                             |
  189.          |                  |                             |-- examples
  190.    HD ---|                  ----- RLaB (you are here) ----|
  191.          |                                                |-- help
  192.          -------- Kevin                                   |
  193.                                                           |-- toolbox
  194.          
  195.    When you launch RLaB, you are in RLaB directory.  If you wish to 
  196.    change directory to "examples", you can use either
  197.    
  198.    >cd(":examples");  // relative method ( cannot use cd("examples"); )
  199.    
  200.    or
  201.    
  202.    >cd("HD:App:RLaB:examples");  // absolute method
  203.    
  204.    The colon ":" means present directory, it is similar to "." on the Unix
  205.    but not exactly the same.  You MUST supply a ":" at first if partial 
  206.    (relative) pathname is used.  If the first character of a pathname is not 
  207.    a ":", it is a full (absolute) pathname.  Two colons "::" means parent 
  208.    directory (folder).  Three colons ":::" means grandparent directory.
  209.    
  210.    For example, if your work directory is in Kevin and you are in 
  211.    RLaB now,  you can use either
  212.    
  213.    >cd(":::Kevin");   // relative method
  214.    
  215.    or
  216.    
  217.    >cd("HD:Kevin");   // absolute method
  218.    
  219.    to change directory to Kevin.
  220.    
  221. 5. Your machine must have a MC68020/30/40 and a numerical processor 
  222.    (MC68881 or better) to run RLaB (sorry!).   You don't need a numerical 
  223.    processor on a MC68040 based machine.  You also need System 7 to run it. 
  224.    RLaB is a 32-bit clean program.  Try
  225.    
  226.    >load("test")
  227.  
  228.    on your machine to see if your machine can pass all tests.  A version
  229.    for PoerMac is in progress.
  230.       
  231. 6. The total size of arrays is only limited by the available memory of your 
  232.    machine.  If RLaB runs out of memory, it will display
  233.        
  234.         RLaB: out of memory. 
  235.         
  236.    on the screen.  You can either increase RLaB memory using 'Get Info' of 
  237.    System 7 Finder or, if your physical RAM is limited, turn on the virtual
  238.    memory and set memory size large enough for your application.     
  239.  
  240. 7. To interrupt RLaB during execution, type command-. (i.e. press command 
  241.    key + period key), it will return to the interactive mode in the next i/o.  
  242.    To abort RLaB and kick it out, you can use File-Quit (command-Q) on Menu bar. 
  243.    You can also do so by type in command-d at the beginning of a command line.
  244.    If RLaB hangs, type command-option-esc to abort it.
  245.  
  246. 8. The source code of mac version is merged in the rlab source distribution.
  247.    Those statements within #ifdef THINK_C  ... #endif are my modifications
  248.    for THINK C compiler on the Mac.  I've modified the console user 
  249.    interface.  Three difference files diff1, diff2, and diff3 tell you 
  250.    those modifications.  You also need f2c and POSIX libraries.  They are
  251.    available in info-mac as well as in umich mac archives.
  252.    
  253. 9. If you wish to join the RLaB community, send an email to Ian and ask him 
  254.    to add your name in the mailing list.  You can reach the RLaB community by
  255.    sending email to rlab-list@eskimo.com .
  256.    
  257. 10. We need more toolboxes.  Please send your useful .r files to Ian.  Thanks.
  258.  
  259. 11. THIS IS FREE SOFTWARE. THERE IS NO WARRANTY FOR THE PROGRAM.  USE IT AT 
  260.     YOUR OWN RISK.  
  261.  
  262. Have fun!
  263.  
  264. Tzong-Shuoh Yang   
  265. (tsyang@ce.berkeley.edu) 
  266.